﻿using System;
using Web.Models.CoreData;


namespace Web.ViewModel.CoreData
{
    /// <summary>
    /// 系统用户模型
    /// </summary>
    public class SysUserModel
    {
        /// <summary>
        /// 数据唯一标识
        /// </summary>
        public Guid Id { get; set; }
        /// <summary>
        /// 帐号
        /// </summary>
        public String Account { get; set; }
        /// <summary>
        /// 密码
        /// </summary>
        public String Password { get; set; }
        /// <summary>
        /// 姓名
        /// </summary>
        public String Name { get; set; }
        /// <summary>
        /// 电话
        /// </summary>
        public String Phone { get; set; }

        /// <summary>
        /// 模型转换
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public SysUserModel ConvertSysUserModel(SysUser model)
        {
            return new SysUserModel()
            {
                Account = model.Account,
                Id = model.Id,
                Name = model.Name,
                Phone = model.Phone
            };
        }

    }
}
